var _common_util = require('util/common_util.js');

var _product_service = {

    getProductList : function(listParam, resolve, reject){
        _common_util.request({
            url     : _common_util.getServerURL('product/list'),
            data    : listParam,
            success : resolve,
            error   : reject
        });
    },
    // 获取商品详细信息
    getProductDetail : function(productId, resolve, reject){
        _common_util.request({
            url     : _common_util.getServerURL('product/detail'),
            data    : {
                productId : productId
            },
            success : resolve,
            error   : reject
        });
    }
};

module.exports = _product_service;